﻿using System;
using System.ComponentModel;

namespace MefSeismoAddin
{
	public class SensorReading : INotifyPropertyChanged
	{
		#region Reading Property
		private double _reading;
		public double Reading
		{
			get
			{
				return _reading;
			}
			set
			{
				_reading = value;
				OnPropertyChanged("Reading");
			}
		}
		#endregion

		#region Timestamp Property
		private DateTime _timestamp;
		public DateTime Timestamp
		{
			get
			{
				return _timestamp;
			}
			set
			{
				_timestamp = value;
				OnPropertyChanged("Timestamp");
			}
		}
		#endregion

		#region INotifyPropertyChanged Members

		public event PropertyChangedEventHandler PropertyChanged;

		private void OnPropertyChanged(string prop)
		{
			if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(prop));
		}

		#endregion
	}
}